//
//  HTMainCollectionViewCell.m
//  HeartTravel
//
//  Created by lanou on 15/10/31.
//  Copyright © 2015年 陈文杰. All rights reserved.
//

#import "HTMainCollectionViewCell.h"
#import "UIImageView+WebCache.h"
@implementation HTMainCollectionViewCell
- (void)setConfigureModel:(HTGroupMainListModel *)configureModel{
    _configureModel = configureModel;
    [_imageView sd_setImageWithURL:[NSURL URLWithString:configureModel.cover_s]];
    _nameLabel.text = configureModel.name;
}

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        _imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        _imageView.backgroundColor = [UIColor colorWithRed:0.912 green:1.000 blue:0.906 alpha:1.000];
        _imageView.layer.cornerRadius = 15;
        _imageView.layer.masksToBounds = YES;
        [self.contentView addSubview:_imageView];
        
        _nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, frame.size.height - 30, frame.size.width, 30)];
        _nameLabel.font = [UIFont systemFontOfSize:18];
        _nameLabel.textColor = [UIColor whiteColor];
        _nameLabel.textAlignment = 1;
        [self.contentView addSubview:_nameLabel];
    }
    return self;
}
@end
